package InterviewsExposed;

public class Recursion {

	public int factorial (int n){
		
		if (n == 0){
			return 1;
		}
		else{
			return n * factorial(n - 1);
		}
	}
	
	public int factorialNoRecursive(int n){
		
		int res = 1;
		
		for (int i = n; i > 1; i--){
			res = res * i;
		}
		return res;
	}
}
